package com.ddd.mill.api.dictionary;

import com.ddd.mill.query.dictionary.DictionaryQueryService;
import com.ddd.mill.api.dictionary.dto.response.DictionaryUnitListDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liu
 * @title: DictionaryController
 * @projectName trading-center
 * @date 2020/11/3015:30
 */
@Api(tags = "字典接口")
@Slf4j
@RestController
@RequestMapping
public class DictionaryController {
    @Autowired
    DictionaryQueryService dictionaryQueryService;

    @ApiOperation("单位列表")
    @GetMapping("/admin/get/dictionary/unit/list")
    public List<DictionaryUnitListDto> unitList(){
        return dictionaryQueryService.unitList();
    }
}
